<h2>pivot.js</h2>
<p>Advanced interactive Pivot table.</p>
<hr/>

<h3>Objects</h3>
<ul>
	<li><a href="#pivot">OAT.Pivot(div, chartDiv, filterDiv, headerRow, dataRows, headerRowIndexes, headerColIndexes, filterIndexes, dataColumnIndex, optObj)</a></li>
</ul>
	
<h3>Constants</h3>
<ul>
	<li>OAT.PivotData.TYPE_BASIC</li>
	<li>OAT.PivotData.TYPE_PERCENT</li>
	<li>OAT.PivotData.TYPE_SCI</li>
	<li>OAT.PivotData.TYPE_SPACE</li>
	<li>OAT.PivotData.TYPE_CUSTOM</li>
</ul>

<h3>CSS classes</h3>
<ul>
	<li>.pivot_table</li>
	<li>.h1</li>
	<li>.h2</li>
	<li>.odd</li>
	<li>.even</li>
	<li>.subtotal</li>
	<li>.total</li>
	<li>.gtotal</li>
	<li>.pivot_chart</li>
	<li>.pivot_row_chart</li>
	<li>.pivot_col_chart</li>
</ul>

<hr/>

<h3><a name="pivot">OAT.Pivot(div, chartDiv, filterDiv, headerRow, dataRows, headerRowIndexes, headerColIndexes, filterIndexes, dataColumnIndex, optObj)</a></h3>
<p>Creates Pivot table. Arguments are explained below:</p>
<ul>
	<li><em>div</em> - table will be created as a child of this element</li>
	<li><em>chartDiv</em> - pivot chart will be created as a child of this element</li>
	<li><em>filterDiv</em> - 'paging' selects will go here</li>
	<li><em>headerRow</em> - array of headings for <em>dataRows</em></li>
	<li><em>dataRows</em> - array of rows. Every row (array) must have the same number of elements as <em>headerRow</em></li>
	<li><em>headerRowIndexes</em> - array, containing indexes of columns which should be drawn as vertical aggregate columns</li>
	<li><em>headerColIndexes</em> - array, containing indexes of columns which should be drawn as horizontal aggregate columns</li>
	<li><em>filterIndexes</em> - array, containing indexes of columns which should be drawn as paging aggregate columns</li>
	<li><em>dataColumnIndex</em> - index of data column</li>
	<li><em>optObj</em> - object containing
		<ul>
			<li>headingBefore - should we create headings before data?</li>
			<li>headingAfter - should we create headings after data?</li>
			<li>agg - constant, specifying appropriate aggregating function index</li>
			<li>aggTotals - constant, specifying appropriate aggregating function index for sub-totals and totals</li>
			<li>showChart - show chart?</li>
			<li>showRowChart - show row totals chart?</li>
			<li>showColChart - show column totals chart?</li>
			<li>type - one of TYPE_ constants for number formatting</li>
			<li>customType - formatting function for TYPE_CUSTOM</li>
			<li>showEmpty - show columns & rows with null values?</li>
			<li>subtotals - show subtotals?</li>
			<li>totals - show totals?</li>
		</ul>
	</li>
</ul>
